home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ IE Window Size.xpl < prev    next >
Text File  |  2003-11-19  |  3KB  |  105 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="2"
  4. "UIPATH"="Internet\Internet Explorer\Window Settings"
  5. "NAME"="Window Size"
  6. "VERSION"="1.01"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Height"
  9. "TEXT 2"="Width"
  10. "DESCRIPTION 1"="Internet Explorer always saves the size of the current window when you close it - you have no direct control about how big the window is. With this settings, you can control the size directly."
  11. "DESCRIPTION 2"="Note #1: Please close Internet Explorer before using this plug-in else Internet Explorer  will overwrite the settings defined here."
  12. "DESCRIPTION 3"="Note #2: If you change the size of Internet Explorer and close it normally, the settings here will be overwritten with the current values. There is no chance to stop Internet Explorer from doing this." 
  13. "DESCRIPTION 4"="Settings found by ozymandius39@hotmail.com, more information: http://resiler.tripod.com/cgi-bin/"
  14. "AUTHOR"="Xteq Systems"
  15. "CONTACTURL"="http://www.xteq.com"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"="Thanks to ozymandius39@hotmail.com !"
  18. "COMMENT 2"=" "
  19.  
  20.  
  21. sV="HKCU\Software\Microsoft\Internet Explorer\Main\Window_Placement"
  22. sValue=""
  23.  
  24. iWidth=0
  25. iHeight=0
  26.  
  27. Sub Plugin_Initialize 
  28.  sValue=RegReadValue(sV)
  29.  
  30.  'first read the first word
  31.  sByte1=mid(sValue,73,2)
  32.  sByte2=mid(sValue,75,2)
  33.  
  34.  'now calculate the "real" value
  35.  iWidth=CInt("&H" & sByte2 & sByte1)
  36.  
  37.  'read the second word
  38.  sByte1=mid(sValue,81,2)
  39.  sByte2=mid(sValue,83,2)
  40.  
  41.  'now calculate the "real" value
  42.  iHeight=CInt("&H" & sByte2 & sByte1)
  43.  
  44.  Call SetUIElement(1,iHeight)
  45.  Call SetUIElement(2,iWidth)
  46. End Sub
  47.  
  48.  
  49. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  50.  iHeight=GetUIElement(1)
  51.  iWidth=GetUIElement(2)
  52.  sValue=RegReadValue(sV)
  53.  
  54.  'first word...
  55.  s=Hex(iWidth)
  56.  s=returnCorrectHex(s)
  57.  
  58.  sByte2=mid(s,1,2)
  59.  sByte1=mid(s,3,2)
  60.  
  61.  sValueNew=left(sValue,72)
  62.  sValueNew=sValueNew & sByte1 & sByte2
  63.  sValueNew=sValueNew & mid(sValue,77,4)
  64.  
  65.  'second word...
  66.  s=Hex(iHeight)
  67.  s=returnCorrectHex(s)
  68.  
  69.  sByte2=mid(s,1,2)
  70.  sByte1=mid(s,3,2)
  71.  
  72.  sValueNew=sValueNew & sByte1 & sByte2
  73.  sValueNew=sValueNew & right(sValue,4)
  74.  
  75.  
  76.  Call RegWriteValue(sV,sValueNew,3)
  77. End Sub
  78.  
  79.  
  80. Function returnCorrectHex(inp)
  81.  s=inp
  82.  
  83.  if len(s)=1 then
  84.     s="000" & s
  85.  else
  86.     if len(s)=2 then
  87.        s="00" & s
  88.     else
  89.        if len(s)=3 then
  90.           s="0" & s
  91.        end if
  92.     end if
  93.  end if
  94.  
  95.  returnCorrectHex=s
  96. End Function
  97.  
  98.  
  99.  
  100. Sub Plugin_Terminate 
  101. End Sub
  102.  
  103.  
  104.  
  105.